import 'package:grocery_app_demo/generated/json/base/json_convert_content.dart';
import 'package:grocery_app_demo/api/entity/login_res_entity.dart';

LoginResEntity $LoginResEntityFromJson(Map<String, dynamic> json) {
	final LoginResEntity loginResEntity = LoginResEntity();
	final int? userId = jsonConvert.convert<int>(json['userId']);
	if (userId != null) {
		loginResEntity.userId = userId;
	}
	final String? accessToken = jsonConvert.convert<String>(json['accessToken']);
	if (accessToken != null) {
		loginResEntity.accessToken = accessToken;
	}
	final String? refreshToken = jsonConvert.convert<String>(json['refreshToken']);
	if (refreshToken != null) {
		loginResEntity.refreshToken = refreshToken;
	}
	final int? expiresTime = jsonConvert.convert<int>(json['expiresTime']);
	if (expiresTime != null) {
		loginResEntity.expiresTime = expiresTime;
	}
	final String? nickname = jsonConvert.convert<String>(json['nickname']);
	if (nickname != null) {
		loginResEntity.nickname = nickname;
	}
	return loginResEntity;
}

Map<String, dynamic> $LoginResEntityToJson(LoginResEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['userId'] = entity.userId;
	data['accessToken'] = entity.accessToken;
	data['refreshToken'] = entity.refreshToken;
	data['expiresTime'] = entity.expiresTime;
	data['nickname'] = entity.nickname;
	return data;
}